<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

<h:body>
    <h:form id="addEmployeeDialogForm">
        <p:growl id="growl" showDetail="true" life="3000"/>
        <h:panelGrid columns="2" cellpadding="10" cellspacing="10">
            <h:outputLabel for="emploee_name" value="ФИО сотрудника: "/>
            <p:autoComplete id="emploee_name" queryDelay="1000"
                            value="#{employeesBean.employeeProject.employees.name}" effect="fade"
                            completeMethod="#{employeesBean.gelCompleteEmployee}"/>
            <h:outputLabel for="emploee_object" value="Объект: "/>
            <p:selectOneMenu id="emploee_object" value="#{employeesBean.employeeProject.objects.name}" effect="fold" >
                <f:selectItem itemLabel="Выберите объект " itemValue="" />
                <f:selectItems value="#{projectBean.projects}" />
            </p:selectOneMenu>


            <h:outputLabel for="emploee_salary" value="Колличество часов: "/>
            <p:inputText id="emploee_salary" value="#{employeesBean.employeeProject.id.quantity}" required="true"/>

            <h:outputLabel for="emploee_salary_date" value="Дата: "/>
            <p:calendar  value="#{employeesBean.employeeProject.id.workDate}" id="emploee_salary_date" showButtonPanel="true"/>
            <f:facet name="footer">
                <p:commandButton id="saveButton" value="Добавить" update="growl" actionListener="#{employeesBean.saveExpense}"
                                 oncomplete="handleAddEmployeeExpenseRequest(xhr, status, args)" />
            </f:facet>
        </h:panelGrid>

    </h:form>
</h:body>

</html>